package com.tars.txappend.service.impl;

import com.tars.txappend.dao.EndDao;
import com.tars.txappend.entity.OrderEntity;
import com.tars.txappend.service.EndService;
import com.tars.txtm.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: Franz 2022/3/14
 */
@Service
public class EndServiceImpl implements EndService {

    @Autowired
    private EndDao dao;

    @GlobalTransactional(isEnd = true)
    public void endService(Integer order) {
        OrderEntity entity = new OrderEntity();
        entity.setNum(1);
        dao.insert(entity);
        int a = 1/order;
    }
}
